package com.jd.sunny.java;

/**
 * @Description:test java method
 * @author:sunlin
 * @since:2012-11-28 13:52
 * @version:1.0.0
 */
public class TestMethod {
    
    public static void main(String[] args)  {
        int largest = max(10,11,12);
        System.out.println("largest = " + largest);
    }

    /**
     * test method indeterminacy parameter count,retrun the max number
     */
    private static int max(int...args){
        int largest = Integer.MIN_VALUE;
        for(int i : args){
            if(i > largest){
                largest = i ;
            }
        }
        return largest;
    }
    
}
